package link_list;

/**
 * @author swing
 * @description 单项链表 反转链表
 * @create 2022 - 11 - 17 23:53
 */
public class LinkedList<E> implements List<E> {
    private Node head;
    private int size;

    public LinkedList() {
        this.head = new Node<E>(null, null);
        this.size = 0;
    }

    @Override
    public boolean add(E e) {
        Node lastNode = head.next;
        return false;
    }

    @Override
    public boolean addFirst(E e) {
        return false;
    }

    @Override
    public boolean addLast(E e) {
        return false;
    }

    @Override
    public boolean remove(Object o) {
        return false;
    }

    @Override
    public E get(int index) {
        return null;
    }

    @Override
    public void printLinkList() {

    }


    /**
     * 设置为私有 静态的只允许当前类访问 不允许其他类访问
     *
     * @param <E>
     */
    private static class Node<E> {
        E item;
        Node<E> next;


        public Node(E element, Node<E> next) {
            this.item = element;
            this.next = next;

        }
    }
}
